import React from 'react';
import { View, Text, ActivityIndicator } from 'react-native';

interface LoadingStateProps {
  message?: string;
  size?: 'small' | 'large';
}

/**
 * 加载状态组件 - 在数据加载时显示加载动画和提示信息
 */
const LoadingState: React.FC<LoadingStateProps> = ({
  message = "正在加载...",
  size = "large"
}) => {
  return (
    <View className="flex-1 items-center justify-center px-8 py-12">
      <ActivityIndicator 
        size={size} 
        color="#3B82F6" 
        className="mb-4"
      />
      
      <Text className="text-gray-500 text-center">
        {message}
      </Text>
    </View>
  );
};

export default LoadingState; 